A-OPTIS:      ASUS O!Play Optware Installation Script
Version:      0.2a
Date:         20/12/2009
by Leogansky: leoxgansky@gmail.com

==============================================================

v0.2a - 20/12/2009:

 + Log file (/a-optis_log)

 + Samba Configuration:
      
    - IMPORTANT: Windows 7 / Vista users need to execute the Registry script included in
                  this zip file (Samba oplay fix.reg) to enable Samba access.
                  To remove the effects of the previous script, execute the 
                  'Samba oplay remove fix.reg' script.    
                  
                  After that, do the following steps:
                   1 - On "Run" command, execute "secpol.msc".
                   2 - Select "Local Policies" --> "Security Options" on the left pane.
                   3 - Select "Network Security: LAN Manager authentication level" 
                       on the right pane. 
                   4 - Select "Send LM and NTLM  use NTLMV2 session security if negotiated".
                   5 - Click OK, close the remaining windows, and restart the computer. 
 
 + perfected some parts of the installation process
 
 TODO: WakeOnLan, DynDNS, etc.

**************************************************************

v0.2 - 19/12/2009:

 + new application: NAS - SMB/CIFS Server (Samba)
 
   - Protected Access (can be altered inside Samba's 
                       configuration file: '/opt/etc/samba/smb.conf')
      * user: root
      * password: set after Samba installation.
            
   - Shares:
      * [Usb] - all USB disks connected to O!Play (read and write permissions)
      * [Asus] - internal Asus disk (read-only permissions, in order to protect the device)
      NOTE: Permissions can be altered in Samba's configuration file.                    
 
 + perfected some parts of the installation process
 
 TODO: Log, WakeOnLan, DynDNS, etc.

**************************************************************

v0.1 - 18/12/2009:

 - for use with at least a single USB disk connected to O!Play, with one or more
   partitions
 
 - supports various disks connected via HUB to O!Play

 - supports complete automated installations of:
    * optware      (base system)
    * Nano         (text editor)    
    * OpenSSH      (SSH/SFTP Server)
    * Transmission (BitTorrent Client)
 
 - future work includes:
    * more applications (Samba, Apache, etc.)                

==============================================================      

NOTE: If you already have disk filled with data and you're not thinking about 
      formatting it, follow the next steps before proceeding with the 
      installation of the a-optis script:

Steps:

1 - You're going to need a pen or a disk to format as system disk, and a usb HUB.

2 - First, start by identifying the hub ports. 
    THE SYSTEM DISK MUST BE CONNECTED TO PORT 1.

3 - In order to do this, execute the "usbview.exe" program for Windows 
    included in this zip on your PC, WHITHOUT CONNECTING THE HUB TO THE PC.

4 - Select "Options -> Auto Refresh" (picture1.jpg)

5 - Connect the hub to your PC, and the device list will be refreshed 
    automatically, showing the hub (in my case, with 4 ports) (picture2.jpg)
    
6 - Grab a pen or a usb disk, and connect it to the several hub ports. You'll
    start to see the variour hub ports becoming active. 
    This way, you can identify the several hub ports.
    Identify the hub port 1.
    
7 - You can now plug the hub to ASUS O!Play, and connect the pen or disk that
    will be formatted as system disk to the hub's port 1.
    
8 - Follow the following steps to install the a-optis script.


=======================================================================
              

Steps for executing the a-optis script onto your ASUS O!Play:

1 - Make sure your ASUS O!Play is connected to an internet-enabled router.

2 - Get putty => http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
    "Windows installer for everything except puttytel".
    
3 - Get the latest O!Play firmware from here: http://support.asus.com/download/download.aspx?product=19&model=O!Play%20HDP-R1&SLanguage=en-us&os=5

4 - Install the firmware following the instructions that are bundled with it.

5 - Copy the "a-optis" script file onto the root of a USB disk/pen drive
    (you can use the disk that will be formatted for this)

6 - Plug the disk/pen into ASUS O!Play

7 - With O!Play connected to the TV, open "Setup", then go to "Network", 
    and write down the O!Play's ip address.

8 - Execute putty. Enter the O!Play's ip address, select "Telnet" connection, 
    and press "Open".

9 - Login to O!Play by entering "root" as user. No password required.

10 - Execute the following commands at the command-prompt, by order:

    10.1 - mount / -o remount,rw
    10.2 - cp /usr/local/bin/Resource/arial.ttf /usr/local/bin/Resource/WenQuanYiZH.ttf
    10.3 - cp /tmp/usbmounts/sda1/a-optis /a-optis
    10.4 - chmod +x /a-optis
    
11 - Now you're ready to begin using the a-optis script. 
     This tutorial assumes that O!Play is connected directly to a USB disk,
     or to port 1 of a hub.
     
12 - If you want to use the full disk/pen space as system, jump this step and
     move on to 13.

     Partition your USB disk in the following way:
     partition 1: full disk space (system + data) - the most common option
     
     or 
     
     partition 1: 1GB (system)
     partition 2: remaining space (data)
     
     or you can add extra partitions, as long as you keep partition 1 as 
     the system partition
     
     You don't need to format partition 1. A-optis will do that for you. 
     The remaining partitions must be formatted before you can use them.
     
     Partitioning tools:
     - Windows Vista / 7 Disk Manager (included in Windows)
     - GParted: http://gparted.sourceforge.net/livecd.php
     - Parted Magic: http://partedmagic.com/download.html
     - Partition Master: http://www.partition-tool.com/personal.htm
     
13 - Plug the partitioned USB disk into O!Play and execute the script on the O!Play's command prompt:
    13.1 - /a-optis
    
14 - Follow the on-screen instructions.

15 - In the end, you can delete the a-optis script if you want (you won't delete the stuff that was installed):
    15.1 - mount / -o remount,rw
    15.2 - rm /a-optis
     
16 - If you have a hub, you can connect other disks/pens to the remaining hub
     ports, and they will be automatically recognized by ASUS O!Play.
     Don't forget to KEEP THE SYSTEM DISK/PEN CONNECTED ON HUB PORT 1.